<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Generator" content="{$ts['site']['site_name']}"/>
<meta http-equiv="X-UA-Compatible" content="IE=7"/>
<meta name="keywords" content="{$ts['site']['site_header_keywords']}" />
<meta name="description" content="{$ts['site']['site_header_description']}" />
<meta name="pagename" content="category"/>

<link rel="shortcut icon" href="__PUBLIC__/Images/global/favicon.gif" />


<title>{$ts['site']['site_name']} - {$ts['site']['site_slogan']}</title>

<!-- 处理ie6下png透明 -->
<!--[if lte IE 6]>
<style type="text/css">
img, div , .pngfix , dd , dt ,li ,span { behavior: url('<php>echo SITE_URL;</php>__PUBLIC__/Js/iepngfix/iepngfix.htc'); }
</style>
<script type="text/javascript" src="__PUBLIC__/Js/iepngfix/iepngfix_tilebg.js"></script>
 <script type="text/javascript">
 //<![CDATA[
 if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) &&
  document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule)
 {
  document.styleSheets[0].addRule('*', 'behavior: url("<php>echo SITE_URL;</php>__PUBLIC__/Js/iepngfix/iepngfix.htc")' );
 }
 //]]>
 </script>
<![endif]-->

<!--  link href="__PUBLIC__/Css/header.css" rel="stylesheet" type="text/css"  / -->
<link href="__PUBLIC__/Css/global.css" rel="stylesheet" type="text/css">

<link href="__PUBLIC__/Css/layout.css" rel="stylesheet" type="text/css"  />
<link href="__PUBLIC__/Css/public.css" rel="stylesheet" type="text/css"  />
<link href="__PUBLIC__/Js/tbox/box_red.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	var KURLDATA = {
			changeverify : "{:U('Index://Public/verify')}"
	};
	var quickloginpath	=	'/Index/index.php/Public/login/ajx_login/yes';
</script>
<!-- 核心JS加载 -->
<script type="text/javascript" src="__PUBLIC__/Js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/tbox/box.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/kim.base.util.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/rcalendar.js" ></script>

<script type="text/javascript" src="__PUBLIC__/Js/scrolltopcontrol.js"></script>
<!--  script type="text/javascript" src="__PUBLIC__/Js/jquery.jgrow.min.js"></script -->

<script type="text/javascript">
	var K_MOBILE_CHECK_EXP = {:C('MOBILE_CHECK_EXP')};

	/**
	*	选择区域
	*	参数：typevalue 以 “,”分割区域id
	**/
	function k_selectArea(typevalue){
		//var typevalue = $("#current").val();
		//alert('&selected='+typevalue);
		//ui.box.load("{:U('Index://Public/area',array('selected'=>''))}"+typevalue,{title:'选择城市'});
		k_show("{:U('Index://Public/area')}",{selected:typevalue},'选择城市');
	}
	
	function k_docollection(data,callback_fun){
		//alert($('#coll_inform_email').val());
		data.email = $('#coll_inform_email').val();
		data.sendname = $('#coll_inform_sendname').val();
		$('#coll_inform_email').val('');
		$.kajax({      
			ajx_rtn_type:'JSON',
			url:"{:U('User://Index/ajxdoCollection')}",      
			type:'post', //数据发送方式  
			data:data,    
			async: false ,//同步方式     
			success: function(obj){ 
				if(obj.status==1){
					k_success(obj.msg);
					k_refreshcollectionbtn(data.shelf_id,'cancel');
					if(callback_fun!=null)callback_fun();
				}else{
					k_error(obj.msg);
				}
			}
		});
	}
	
	function k_cancelcollection(data,callback_fun){
		$.kajax({      
			ajx_rtn_type:'JSON',
			url:"{:U('User://Index/ajxcancelCollection')}",      
			type:'post', //数据发送方式  
			data:data,    
			async: false ,//同步方式     
			success: function(obj){ 
				if(obj.status==1){
					k_success(obj.msg);
					k_refreshcollectionbtn(data.shelf_id,'do');
					if(callback_fun!=null)callback_fun();
				}else{
					k_error(obj.msg);
				}
			}
		});
	}
	function k_refreshcollectionbtn(shelf_id,showtype){
		jobj = $("td[id='sys_k_show_collection_btn'][rel='"+shelf_id+"']");
		if (typeof(jobj) == "undefined"){
			return;
		}
		if(showtype=='do'){
				jobj.find('#sys_k_cancel_collection').hide();
				jobj.find('#sys_k_do_collection').show();
		}
		if(showtype=='cancel'){
				jobj.find('#sys_k_do_collection').hide();
				jobj.find('#sys_k_cancel_collection').show();
		}

		/**
		$('#sys_k_show_collection_btn').each(function(){
			jobj = $(this);
			if(jobj.attr('rel')==shelf_id){
				if(showtype=='do'){
					jobj.find('#sys_k_cancel_collection').hide();
					jobj.find('#sys_k_do_collection').show();
				}
				if(showtype=='cancel'){
					jobj.find('#sys_k_do_collection').hide();
					jobj.find('#sys_k_cancel_collection').show();
				}
			}
		});
		**/
	}
	function k_initcollectionbtn(){
		<php>if(!empty($_SESSION['mid'])){</php>
		var shelf_ids = '';
		var sys_k_show_collection_btn =$('body').find('#sys_k_show_collection_btn');
		sys_k_show_collection_btn.each(function(){
			shelf_ids = shelf_ids+","+$(this).attr('rel');
		});
		if(shelf_ids!=''){
			$.kajax({      
				ajx_rtn_type:'JSON',
				url:"{:U('User://Index/ajxgetCollections')}",      
				type:'post', //数据发送方式  
				data:{ shelf_ids:shelf_ids,stype:'{:Dict::TOBESEND}' },    
				async: false ,//同步方式     
				success: function(objs){
					//alert(objs.status);
					if(objs.status==1){
						sys_k_show_collection_btn.each(function(){
								var shelf_id = $(this).attr('rel');
								if (typeof(objs.data[shelf_id]) != "undefined"){
									k_refreshcollectionbtn(shelf_id,'cancel');
								}
						});
					}
				}
			});
		}
		<php>}</php>
	}
	function resendCoupon(url_,data_){
		k_loading('发送中...','重新发送');
		$.kajax({      
			ajx_rtn_type:'JSON',
			url:url_,      
			type:'post', //数据发送方式  
			data:data_ ,    
			async: false ,//同步方式     
			success: function(ojson){ 
						ui.box.close();
						if(ojson.status==1){
							k_success(ojson.msg);
						}else{
							k_error(ojson.msg);
						}
			}
		});
	}
	
	/**法送邮件给对方**/
	function sendHeEmail(_this,coll_inform_sendname){
		ui.confirm(_this,'填写TA的邮箱地址<br>我们将发送邮件通知他你希望TA购买这款礼品。'
							+'<br>姓名：<input type=\'text\' title=\'邮件中显示的发件人姓名\' value=\''+coll_inform_sendname+'\' '
									+'class=\'do_input s_input\'  style=\'width:180px;height: 20px; font-size: 12px;line-height: 20px;\' id=\'coll_inform_sendname\'/>'
							+'<br>邮箱：<input type=\'text\' title=\'接收者邮箱地址\' '
									+'class=\'do_input s_input\'  style=\'width:180px;height: 20px; font-size: 12px;line-height: 20px;\' id=\'coll_inform_email\'/>');
	}
</script>

</head>
<body>

<php>//dump($_COOKIE);
//$cookieId = explode( '.', base64_decode(C('COOKIE_FLAG_USER')) );
//dump($cookieId);
</php>


<div class="container">
  	<!--=============header start============-->
  	<div class="header">
    	<div class="hdtop">
			<php>if(empty($_SESSION['mid'])||$_SESSION['login_status']!='user'){</php>
			<!-- 用户未登陆 -->
				<a href="{:U('Index://Public/login')}" 
						class="red">用户登录</a>|<a href="{:U('Index://Public/register')}" 
						class="red">用户注册</a>
			<php>}else{</php>
				<!-- 用户已登陆  {$ts['site']['site_name']}-->
				<php>if($_SESSION['login_status']=='user'){</php>
				欢迎&nbsp;
					<strong><span id="nickname">{$_SESSION['uname']}</span></strong>
					<php>if('sina'==$user['sync_type']){</php>
						<img src="/Public/Images/global/sina24x24.png" style="width:16px" align="absmiddle" title="新浪微博直接登录">
					<php>}</php>
					<php>if('douban'==$user['sync_type']){</php>
						<img src="/Public/Images/global/douban24x24.png" style="width:16px" align="absmiddle" title="豆瓣直接登录">
					<php>}</php>
					&nbsp;光临！</span>|<a href="{:U('User://Index/index')}">我的页面</a>|<a href="{:U('Index://Public/logout')}">退出</a>
				<php>}</php>
				<php>if($_SESSION['login_status']=='agent'){</php>
					<!-- 用户已登陆  {$ts['site']['site_name']}-->
					欢迎&nbsp;
						<strong><span id="nickname">{$_SESSION['uname']}</span></strong>
						&nbsp;光临！</span>|<a href="{:U('agent://Account/index')}">我的联盟中心</a>|<a href="{:U('agent://Public/logout')}">退出</a>
					<!--  
					<li>|</li>
					<li><a href="{:U('User://Account/cash',array('atype'=>'charge'))}">账户充值</a></li>
					-->
				<php>}</php>
			<php>}</php>
			|<a href="{:U('Index://Index/help')}">帮助中心</a>
		</div>
    	<div class="logobox"><a class="fl" href="<php>echo SITE_URL;</php>"><img src="__PUBLIC__/Images/global/xxy_03.jpg" /></a>
    		<div class="topr"><img src="__PUBLIC__/Images/global/topr_03.jpg" alt="即时送达" /><img src="__PUBLIC__/Images/global/topr_04.jpg" alt="小资便捷" /><img src="__PUBLIC__/Images/global/topr_05.jpg" alt="品质保证" /><img src="__PUBLIC__/Images/global/topr_06.jpg" alt="表达心意" /></div>
      		<div class="clear"></div>
    	</div>
    
    <php>
//echo APP_NAME.'-'.MODULE_NAME.'-'.ACTION_NAME;
if(APP_NAME=='Index'){
	$_HRADER_MODULE_FLAG = 'HP';
}
if(APP_NAME=='Index'&&MODULE_NAME=='Index'&&ACTION_NAME=="coupon"){
	$_HRADER_MODULE_FLAG = 'COUPON';
}
if(APP_NAME=='Index'&&MODULE_NAME=='Index'&&ACTION_NAME=="help"){
	$_HRADER_MODULE_FLAG = 'HELP';
}
if(APP_NAME=='User'){
	$_HRADER_MODULE_FLAG = 'HP';
}
if(APP_NAME=='Product'&& MODULE_NAME=='Index'){
	$_HRADER_MODULE_FLAG = 'GIFT';
}
if(APP_NAME=='Product'&& MODULE_NAME=='Order'){
	$_HRADER_MODULE_FLAG = 'GIFT';
}
if(APP_NAME=='Product'&& MODULE_NAME=='Brand'){
	$_HRADER_MODULE_FLAG = 'BRAND';
}
if(APP_NAME=='Product'&& MODULE_NAME=='Index'&& ACTION_NAME=='mapsearch'){
	$_HRADER_MODULE_FLAG = 'MAP';
}
if(APP_NAME=='agent'){
	$_HRADER_MODULE_FLAG = 'AGENT';
}
$_ARY_HRADER_NAV_DICT = array(
							'HP' => "首页",
							'GIFT' => "礼品商店",
							'BRAND' => "品牌中心",
							'MAP' => "地图查找",
							'HELP' => "玩转小心意",
							'COUPON'=> "查看".K('SP_COUPON_NM'),
							'AGENT'=> "网站联盟",
							);
</php>
<!---导航--->
	    <div class="mainnav">
	    <p style="float:right; padding-right:20px; color:#FFFFFF;font-weight:bold; font-size:14px;" id="info">小心意目前仅服务于北京地区</p>
	      	<ul>
		         <li>
			      	<a href="{:U('Index://Index/index')}"  class="<php>if($_HRADER_MODULE_FLAG == 'HP'){</php>clected<php>}</php>" >{$_ARY_HRADER_NAV_DICT['HP']}</a>
			      </li>
			      
			      <li>
			      	<a href="{:U('Product://Index/searchp')}"  class="<php>if($_HRADER_MODULE_FLAG == 'GIFT'){</php>clected<php>}</php>" >{$_ARY_HRADER_NAV_DICT['GIFT']}</a>
			      </li>
			      <!--  
			      <li id="<php>if($_HRADER_MODULE_FLAG == 'MAP'){</php>clected<php>}</php>" >
			      	<a href="{:U('Product://Index/mapsearch')}" >{$_ARY_HRADER_NAV_DICT['MAP']}</a>
			      </li>
			      -->
			      <li>
			      	<a href="{:U('Product://Brand/index')}"  class="<php>if($_HRADER_MODULE_FLAG == 'BRAND'){</php>clected<php>}</php>" >{$_ARY_HRADER_NAV_DICT['BRAND']}</a>
			      </li>
			      <li>
			      	<a href="{:U('Index://Index/help',array('docid'=>5))}"  class="<php>if($_HRADER_MODULE_FLAG == 'HELP'){</php>clected<php>}</php>" >{$_ARY_HRADER_NAV_DICT['HELP']}</a>
			      </li>
			      <li>
			      	<a href="{:U('Index://Index/coupon')}"  class="<php>if($_HRADER_MODULE_FLAG == 'COUPON'){</php>clected<php>}</php>" >{$_ARY_HRADER_NAV_DICT['COUPON']}</a>
			      </li>
			       <li style="display:none">
			      	<a href="{:U('agent://Index/index')}"  class="<php>if($_HRADER_MODULE_FLAG == 'AGENT'){</php>clected<php>}</php>" >{$_ARY_HRADER_NAV_DICT['AGENT']}</a>
			      </li>
		        <div class="clear"></div>
	      	</ul>
	    </div>
	</div>
	<div class="blank5"></div>






